

export const rewardStateDict = [
  {code: 'COMMIT', codeName: '订单还未完成'},
  {code: 'WAIT', codeName: '计算奖励额度'},
  {code: 'SUCESS', codeName: '等待充入余额'},
  {code: 'CANCELL', codeName: '订单取消'},
  {code: 'FAIL', codeName: '失败'},
  {code: 'SEND_USER', codeName: '充入用户账户'},
  {code: 'WAIT_REFUND', codeName: '等待扣除奖励'},
  {code: 'REFUND', codeName: '订单取消，扣除奖励'},
];


export function rewardStateGetName(code){
  for (let i = 0; i < rewardStateDict.length; i++) {
    if (rewardStateDict[i].code === code)
      return rewardStateDict[i].codeName;
  }

  return "未知";
}
